package com.jiuwan.gamepass.dto.appAndIcon;

import com.jiuwan.gamepass.pojo.App;
import com.jiuwan.gamepass.pojo.IconApp;

import java.util.Optional;

/**
 * @author： pang-yun
 * @date： 2021-08-27 13:44
 * 功能目的 ：用于
 */

public class AppAndIconFormat {
    public static AppAndIcon formatIcon(App app, IconApp iconApp){
        AppAndIcon appAndIcon = new AppAndIcon();
        if (iconApp!=null){ appAndIcon.setIcon(iconApp.getIcon()); }
        appAndIcon.setName(app.getName());
        appAndIcon.setAppName(app.getAppName());
        appAndIcon.setAppTitle(app.getAppTitle());
        appAndIcon.setAppleId(app.getAppleId());
        appAndIcon.setAccount(app.getAccount());
        appAndIcon.setCreateTime(app.getCreateTime());
        appAndIcon.setId(app.getId());
        appAndIcon.setFlag(app.getFlag());
        appAndIcon.setVersion(app.getVersion());
        appAndIcon.setUpdateTime(app.getUpdateTime());
        appAndIcon.setVersion(app.getVersion());
        appAndIcon.setBundleId(app.getBundleId());
        appAndIcon.setKeyWord(app.getKeyWord());
        appAndIcon.setPrivacyUrl(app.getPrivacyUrl());
        appAndIcon.setTechnologyUrl(app.getTechnologyUrl());
        appAndIcon.setPictures(app.getPictures());
        appAndIcon.setMessage(app.getMessage());
        appAndIcon.setNumber(app.getNumber());
        return appAndIcon;
    }
}
